Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit deprecation warning if multiple v1 templates match with a new index #55558

Merged

Conversation

probakowski
Copy link
Contributor

This change adds deprecation warning when multiple v1 templates match with a new index.
This is deprecated because with v2 templates only one template can match and multiple "levels" of settings should be done using component templates.

Relates to #53101

@probakowski probakowski added :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.8.0 labels Apr 21, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@martijnvg martijnvg mentioned this pull request Apr 21, 2020
39 tasks
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for changing this @probakowski! Before we merge it could you run a test locally with ESClientYamlTestSuite's method:

@BeforeClass
public static void initializeUseDefaultNumberOfShards() {
    useDefaultNumberOfShards = usually();
}

Where usually() is changed to false? This will install a global template for all the YAML tests, and I want to make sure there are no tests that are going to fail due to warnings (better to fail now before we cause CI failures)

@probakowski
Copy link
Contributor Author

@dakrone that was good idea, there's plenty of failures. I'll work on fixing them and request review again when done

@probakowski
Copy link
Contributor Author

@elasticmachine update branch

@probakowski
Copy link
Contributor Author

@elasticmachine update branch

@probakowski probakowski requested a review from dakrone April 29, 2020 07:38
@probakowski
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, thanks Przemko! I left a comment about clarifying the warning text though, let me know what you think

@probakowski
Copy link
Contributor Author

@elasticmachine update branch

@probakowski probakowski merged commit ad77c7e into elastic:master Apr 30, 2020
@probakowski probakowski deleted the deprecate-multiple-v1-templates branch April 30, 2020 14:38
probakowski added a commit to probakowski/elasticsearch that referenced this pull request Apr 30, 2020
…dex (elastic#55558)

* Emit deprecation warning if multiple v1 templates match with a new index
probakowski added a commit that referenced this pull request Apr 30, 2020
…new index (#55558) (#56038)

* Emit deprecation warning if multiple v1 templates match with a new index (#55558)

* Emit deprecation warning if multiple v1 templates match with a new index

* DEPRECATION_LOGGER rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants